---
import { getCollection, getEntry, type CollectionEntry } from 'astro:content';
import Layout from '../layouts/Layout.astro';
import { getDocsPages } from '../components/docs/utils/pageData';
import { Changelog } from '@components/changelog/Changelog';
import { DocsNavFromLocalStorage } from '@ag-website-shared/components/docs-navigation/DocsNavFromLocalStorage';

export async function getStaticPaths() {
    const pages = await getCollection('docs');
    return getDocsPages(pages);
}

const pageName = 'changelog';

const { data: docsNavData } = (await getEntry('docsNav', 'nav')) as CollectionEntry<'docsNav'>;
---

<Layout
    title={'Changelog | AG Grid'}
    description={'Identify the specific version in which a feature request or bug fix was included. Find changelog items by issue number, summary content, or version.'}
    showDocsNav={true}
    showSearchBar={true}
>
    <div class:list={['contentViewport layout-grid']}>
        <DocsNavFromLocalStorage client:load menuData={docsNavData} pageName={pageName} />

        <Changelog client:load />
    </div>
</Layout>
